import requests
import json
import time
url = "http://10.43.125.170:9840/article/remark/result"

payload = json.dumps({
    "id": 2335
})
headers = {
    'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
"""
for i in range(2335, 2343):
    payload = json.dumps({
        "id": i
    })
    response = requests.request("POST", url, headers=headers, data=payload)
    response_json = json.loads(response.text)
    if not response_json['data']['remark_result']['content']:
        print("内容维度为空")
    if not response_json['data']['remark_result']['evaluate']:
        print("总评维度评价为空")
    if not response_json['data']['remark_result']['langPerformance']:
        print("语言表达维度为空")
    if "与正文某部分精确匹配语言表达好的句子" in response_json['data']['remark_result']['langPerformance']:
        print("语言表达维度非法")
    if not response_json['data']['remark_result']['score']:
        print("总评维度分数字段为空")
    if not response_json['data']['remark_result']['structure']:
        print("结构维度为空")
    if not response_json['data']['remark_result']['suggest']:
        print("总评维度建议为空")
    if not response_json['data']['remark_result']['thematic']:
        print("主题立意维度为空")
    if not response_json['data']['remark_result']['write']:
        print("书写维度为空")
    #print(response.text)
    print("********************************************************************************")
    # 暂停20秒
    time.sleep(20)
    print(response.text)
# response = requests.request("POST", url, headers=headers, data=payload)
# print(response.text)
"""